package com.tarena.elts.entity;

import java.io.Serializable;

public class User implements Serializable {
	private int id;
	private String name;
	private String passwd;
	private String phone;
	private String email;
	public static final long serialVersionUID=9080302019871213L;
	
	public User(){}
	
	public User(int id, String name, String passwd, String phone, String email) {
		super();
		this.id = id;
		this.name = name;
		this.passwd = passwd;
		this.phone = phone;
		this.email = email;
	}
	public User(int id, String name, String passwd) {
		this.id = id;
		this.name = name;
		this.passwd = passwd;
	}

	public int getId() {
		return id;
	}

	public void setId(int id) {
		this.id = id;
	}

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public String getPasswd() {
		return passwd;
	}

	public void setPasswd(String passwd) {
		this.passwd = passwd;
	}

	public String getPhone() {
		return phone;
	}

	public void setPhone(String phone) {
		this.phone = phone;
	}

	public String getEmail() {
		return email;
	}

	public void setEmail(String email) {
		this.email = email;
	}

	@Override
	public int hashCode() {
		// TODO Auto-generated method stub
		return this.id;
	}

	@Override
	public boolean equals(Object obj) {
		// TODO Auto-generated method stub
		if(null==obj) {
			return false;
		}
		if(this==obj) {
			return true;
		}
		if(obj instanceof User){
			User user = (User)obj;
			return this.id==user.id;
		}
		return false;
	}

	@Override
	public String toString() {
		// TODO Auto-generated method stub
		return name;
	}
	

}
